home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
vi.z
/
vi
Wrap
Text File
|
1998-10-20
|
24KB
|
529 lines
vvvviiii((((1111)))) vvvviiii((((1111))))
NNNNAAAAMMMMEEEE
vi, view, vedit - screen-oriented (visual) display editors based on ex
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
vvvviiii [----tttt tag] [----rrrr file] [----LLLL] [----wwwwn] [----RRRR] [----xxxx] [----CCCC] [----cccc command] file ...
vvvviiiieeeewwww [----tttt tag] [----rrrr file] [----LLLL] [----wwwwn] [----RRRR] [----xxxx] [----CCCC] [----cccc command] file ...
vvvveeeeddddiiiitttt [----tttt tag] [----rrrr file] [----LLLL] [----wwwwn] [----RRRR] [----xxxx] [----CCCC] [----cccc command] file ...
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_v_i (visual) is a display-oriented text editor based on an underlying line
editor _e_x(1). It is possible to use the command mode of _e_x from within
_v_i and vice-versa. The visual commands are described on this manual
page; how to set options (like automatically numbering lines and
automatically starting a new output line when you type carriage return)
and all _e_x line editor commands are described on the _e_x(1) reference
page.
When using _v_i, changes you make to the file are reflected in what you see
on your terminal screen. The position of the cursor on the screen
indicates the position within the file.
IIIInnnnvvvvooooccccaaaattttiiiioooonnnn OOOOppppttttiiiioooonnnnssss
The following invocation options are interpreted by _v_i (previously
documented options are discussed in the NNNNOOOOTTTTEEEESSSS section at the end of this
manual page):
----tttt _t_a_g Edit the file containing the _t_a_g and position the editor at
its definition.
----rrrr _f_i_l_e Edit _f_i_l_e after an editor or system crash. (Recovers the
version of _f_i_l_e that was in the buffer when the crash
occurred.)
----LLLL List the name of all files saved as the result of an editor
or system crash.
----wwww_n Set the default window size to _n. This is useful when
using the editor over a slow speed line.
----RRRR RRRReeeeaaaaddddoooonnnnllllyyyy mode; the rrrreeeeaaaaddddoooonnnnllllyyyy flag is set, preventing
accidental overwriting of the file.
----xxxx Encryption option; when used, _v_i simulates the XXXX command of
_e_x and prompts the user for a key. This key is used to
encrypt and decrypt text using the algorithm of _c_r_y_p_t(1).
The XXXX command makes an educated guess to determine whether
text read in is encrypted or not. The temporary buffer
file is encrypted also, using a transformed version of the
key typed in for the ----xxxx option. See _c_r_y_p_t(1).
PPPPaaaaggggeeee 1111
vvvviiii((((1111)))) vvvviiii((((1111))))
----CCCC Encryption option; same as the ----xxxx option, except that _v_i
simulates the CCCC command of _e_x. The CCCC command is like the XXXX
command of _e_x, except that all text read in is assumed to
have been encrypted.
----cccc _c_o_m_m_a_n_d Begin editing by executing the specified editor _c_o_m_m_a_n_d
(usually a search or positioning command). When used with
-_t, the specified command is given after moving to the tag.
The _f_i_l_e argument indicates one or more files to be edited.
The _v_i_e_w invocation is the same as _v_i except that the rrrreeeeaaaaddddoooonnnnllllyyyy flag is
set.
The _v_e_d_i_t invocation is intended for beginners. It is the same as _v_i
except that the rrrreeeeppppoooorrrrtttt flag is set to 1, the sssshhhhoooowwwwmmmmooooddddeeee and nnnnoooovvvviiiicccceeee flags
are set, and mmmmaaaaggggiiiicccc is turned off. These defaults make it easier to learn
how to use _v_i.
vvvviiii MMMMooooddddeeeessss
Command Normal and initial mode. Other modes return to command mode
upon completion. EEEESSSSCCCC (escape) is used to cancel a partial
command.
Input Entered by setting any of the following options: aaaa AAAA iiii IIII oooo OOOO
cccc CCCC ssss SSSS RRRR .... Arbitrary text can then be entered. Input mode
is normally terminated with EEEESSSSCCCC character, or, abnormally,
with an interrupt.
Last line Reading input for :::: //// ???? or !!!!; terminate by typing a carriage
return; an interrupt cancels termination.
CCCCOOOOMMMMMMMMAAAANNNNDDDD SSSSUUUUMMMMMMMMAAAARRRRYYYY
In the descriptions, CR stands for carriage return and EEEESSSSCCCC stands for the
escape key.
SSSSaaaammmmpppplllleeee ccccoooommmmmmmmaaaannnnddddssss
<<<<---- ||||vvvv ||||^^^^ ---->>>> arrow keys move the cursor
hhhh jjjj kkkk llll same as arrow keys
iiii_t_e_x_tEEEESSSSCCCC insert _t_e_x_t
ccccwwww_n_e_wEEEESSSSCCCC change word to _n_e_w
eeeeaaaa_sEEEESSSSCCCC pluralize word (end of word; append ssss;
escape from input state)
xxxx delete a character
ddddwwww delete a word
dddddddd delete a line
3333dddddddd delete 3 lines
uuuu undo previous change
ZZZZZZZZ exit _v_i, saving changes
::::qqqq!!!!CCCCRRRR quit, discarding changes
PPPPaaaaggggeeee 2222
vvvviiii((((1111)))) vvvviiii((((1111))))
////_t_e_x_tCCCCRRRR search for _t_e_x_t
^^^^UUUU ^^^^DDDD scroll up or down
::::_c_m_dCCCCRRRR any _e_x or _e_d command
CCCCoooouuuunnnnttttssss bbbbeeeeffffoooorrrreeee vvvviiii ccccoooommmmmmmmaaaannnnddddssss
Numbers can be typed as a prefix to some commands. They are interpreted
in one of these ways.
line/column number zzzz GGGG ||||
scroll amount ^^^^DDDD ^^^^UUUU
repeat effect most of the rest
IIIInnnntttteeeerrrrrrrruuuuppppttttiiiinnnngggg,,,, ccccaaaannnncccceeeelllliiiinnnngggg
EEEESSSSCCCC end insert or incomplete cmd
DDDDEEEELLLL (delete or rubout) interrupts
FFFFiiiilllleeee mmmmaaaannnniiiippppuuuullllaaaattttiiiioooonnnn
ZZZZZZZZ if file modified, write and exit; otherwise, exit
::::wwwwCCCCRRRR write back changes
::::wwww!!!!CCCCRRRR forced write, if permission originally not valid
::::qqqqCCCCRRRR quit
::::qqqq!!!!CCCCRRRR quit, discard changes
::::eeee _n_a_m_eCCCCRRRR edit file _n_a_m_e
::::eeee!!!!CCCCRRRR reedit, discard changes
::::eeee ++++ _n_a_m_eCCCCRRRR edit, starting at end
::::eeee ++++_nCCCCRRRR edit starting at line _n
::::eeee ####CCCCRRRR edit alternate file
::::eeee!!!! ####CCCCRRRR edit alternate file, discard changes
::::wwww _n_a_m_eCCCCRRRR write file _n_a_m_e
::::wwww!!!! _n_a_m_eCCCCRRRR overwrite file _n_a_m_e
::::sssshhhhCCCCRRRR run shell, then return
::::!!!!_c_m_dCCCCRRRR run _c_m_d, then return
::::nnnnCCCCRRRR edit next file in arglist
::::nnnn _a_r_g_sCCCCRRRR specify new arglist
^^^^GGGG show current file and line
::::ttttaaaagggg _t_a_gCCCCRRRR position cursor to _t_a_g (see _c_t_a_g_s(1)), save position
::::ppppooooppppCCCCRRRR return to previous tag's position
In general, any _e_x or _e_d command (such as _s_u_b_s_t_i_t_u_t_e or _g_l_o_b_a_l) can be
typed, preceded by a colon and followed by a carriage return.
PPPPoooossssiiiittttiiiioooonnnniiiinnnngggg wwwwiiiitttthhhhiiiinnnn ffffiiiilllleeee
^^^^FFFF forward screen
^^^^BBBB backward screen
^^^^DDDD scroll down half screen
^^^^UUUU scroll up half screen
_nGGGG go to the beginning of the specified line
(end default), where _n is a line number
////_p_a_t next line matching _p_a_t
????_p_a_t previous line matching _p_a_t
PPPPaaaaggggeeee 3333
vvvviiii((((1111)))) vvvviiii((((1111))))
nnnn repeat last //// or ???? command
NNNN reverse last //// or ???? command
////_p_a_t////++++_n nth line after _p_a_t
????_p_a_t????----_n nth line before _p_a_t
]]]]]]]] next section/function
[[[[[[[[ previous section/function
(((( beginning of sentence
)))) end of sentence
{{{{ beginning of paragraph
}}}} end of paragraph
%%%% find matching (((( )))) {{{{ or }}}}
^^^^]]]] :tag command using word after the cursor as the tag
^^^^TTTT return to previous tag's position (:pop command)
AAAAddddjjjjuuuussssttttiiiinnnngggg tttthhhheeee ssssccccrrrreeeeeeeennnn
^^^^LLLL clear and redraw window
^^^^RRRR clear and redraw window if ^^^^LLLL is -> key
zzzzCCCCRRRR redraw screen with current line at top of window
zzzz---- redraw screen with current line at bottom of window
zzzz.... redraw screen with current line at center of window
////_p_a_t////zzzz----CCCCRRRR move _p_a_t line to bottom of window
zzzz_n.... use _n-line window
^^^^EEEE scroll window down 1 line
^^^^YYYY scroll window up 1 line
MMMMaaaarrrrkkkkiiiinnnngggg aaaannnndddd rrrreeeettttuuuurrrrnnnniiiinnnngggg
```````` move cursor to previous context
'''''''' move cursor to first non-white space in line
mmmm_x mark current position with the ASCII lower-case letter _x
````_x move cursor to mark _x
''''_x move cursor to first non-white space in line marked by _x
LLLLiiiinnnneeee ppppoooossssiiiittttiiiioooonnnniiiinnnngggg
HHHH top line on screen
LLLL last line on screen
MMMM middle line on screen
++++ next line, at first non-white
---- previous line, at first non-white
CCCCRRRR return, same as +
||||vvvv or jjjj next line, same column
||||^^^^ or kkkk previous line, same column
CCCChhhhaaaarrrraaaacccctttteeeerrrr ppppoooossssiiiittttiiiioooonnnniiiinnnngggg
^^^^ first non white-space character
0000 beginning of line
$$$$ end of line
llll or ---->>>> forward
hhhh or <<<<---- backward
^^^^HHHH same as <<<<---- (backspace)
space same as ---->>>> (space bar)
PPPPaaaaggggeeee 4444
vvvviiii((((1111)))) vvvviiii((((1111))))
ffff_x find next _x
FFFF_x find previous xxxx
tttt_x move to character prior to next _x
TTTT_x move to character following previous _x
;;;; repeat last ffff FFFF tttt or TTTT
,,,, repeat inverse of last ffff FFFF tttt or TTTT
_n|||| move to column _n
%%%% find matching (((( {{{{ )))) or }}}}
WWWWoooorrrrddddssss,,,, sssseeeennnntttteeeennnncccceeeessss,,,, sssseeeeccccttttiiiioooonnnnssss,,,, aaaannnndddd ppppaaaarrrraaaaggggrrrraaaapppphhhhssss
wwww forward a word
bbbb back a word
eeee end of word
)))) to next sentence
}}}} to next paragraph
]]]]]]]] next section/function
[[[[[[[[ previous section/function
(((( back a sentence
{{{{ back a paragraph
WWWW forward a blank-delimited word
BBBB back a blank-delimited word
EEEE end of a blank-delimited word
A paragraph is a superset of a section. In addition to the delimiters
set by the _p_a_r_a_g_r_a_p_h and _s_e_c_t_i_o_n variables, a section is defined as a
line starting with a {{{{ or a ffffoooorrrrmmmmffffeeeeeeeedddd. A paragraph starts with those, a
blank line, or the beginning of a file. These definitions are XXXXPPPPGGGG4444
compliant, and somewhat different than earlier releases. To use the
older definitions, set the variable _o_l_d_p_a_r_a_g_r_a_p_h_s.
CCCCoooorrrrrrrreeeeccccttttiiiioooonnnnssss dddduuuurrrriiiinnnngggg iiiinnnnsssseeeerrrrtttt
^^^^HHHH erase last character (backspace)
^^^^WWWW erase last word
erase your erase character, same as ^^^^HHHH (backspace)
kill your kill character, erase this line of input
\\\\ quotes your erase and kill characters
EEEESSSSCCCC ends insertion, back to command mode
DDDDEEEELLLL interrupt, terminates insert mode
^^^^DDDD backtab one character; reset left margin
of _a_u_t_o_i_n_d_e_n_t
^^^^^^^^DDDD caret (^) followed by control-d (^D);
backtab to beginning of line;
do not reset left margin of _a_u_t_o_i_n_d_e_n_t
0000^^^^DDDD backtab to beginning of line;
reset left margin of _a_u_t_o_i_n_d_e_n_t
^^^^TTTT insert _s_h_i_f_t_w_i_d_t_h spaces.
^^^^VVVV quote non-printable character
IIIInnnnsssseeeerrrrtttt aaaannnndddd rrrreeeeppppllllaaaacccceeee
aaaa append after cursor
PPPPaaaaggggeeee 5555
vvvviiii((((1111)))) vvvviiii((((1111))))
AAAA append at end of line
iiii insert before cursor
IIII insert before first non-blank
oooo open line below
OOOO open above
rrrr_x replace single char with _x
RRRR_t_e_x_tEEEESSSSCCCC replace characters
OOOOppppeeeerrrraaaattttoooorrrrssss
Operators are followed by a cursor motion, and affect all text that would
have been moved over. For example, since wwww moves over a word, ddddwwww deletes
the word that would be moved over. Double the operator, for example, dddddddd
to affect whole lines.
dddd delete
cccc change
yyyy yank lines to buffer
<<<< left shift
>>>> right shift
!!!! filter through command
MMMMiiiisssscccceeeellllllllaaaannnneeeeoooouuuussss OOOOppppeeeerrrraaaattttiiiioooonnnnssss
CCCC change rest of line (cccc$$$$)
DDDD delete rest of line (dddd$$$$)
ssss substitute chars (ccccllll)
SSSS substitute lines (cccccccc)
JJJJ join lines
xxxx delete characters (ddddllll)
XXXX delete characters before cursor (ddddhhhh)
YYYY yank lines (yyyyyyyy)
YYYYaaaannnnkkkk aaaannnndddd PPPPuuuutttt
Put inserts the text most recently deleted or yanked; however, if a
buffer is named (using the ASCII lower-case letters aaaa-zzzz), the text in
that buffer is put instead.
3333yyyyyyyy yank 3 lines
3333yyyyllll yank 3 characters
pppp put back text after cursor
PPPP put back text before cursor
""""_xpppp put from buffer _x
""""_xyyyy yank to buffer _x
""""_xdddd delete into buffer _x
UUUUnnnnddddoooo,,,, RRRReeeeddddoooo,,,, RRRReeeettttrrrriiiieeeevvvveeee
uuuu undo last change
UUUU restore current line
.... repeat last change
""""_dpppp retrieve _d'th last delete
PPPPaaaaggggeeee 6666
vvvviiii((((1111)))) vvvviiii((((1111))))
AAAAUUUUTTTTHHHHOOOORRRR
_v_i and _e_x were developed by The University of California, Berkeley
California, Computer Science Division, Department of Electrical
Engineering and Computer Science.
FFFFIIIILLLLEEEESSSS
/tmp default directory where temporary work files are placed; it can be
changed using the ddddiiiirrrreeeeccccttttoooorrrryyyy option (see the _e_x sssseeeetttt command)
/usr/share/lib/terminfo/?/*
compiled terminal description database
NNNNOOOOTTTTEEEESSSS
Two options, although they continue to be supported, have been replaced
in the documentation by options that follow the Command Syntax Standard
(see _i_n_t_r_o(1)). A ----rrrr option that is not followed with an option-argument
has been replaced by ----LLLL and ++++_c_o_m_m_a_n_d has been replaced by ----cccc _c_o_m_m_a_n_d.
_v_i has a limit of 15,687,678 editable lines. Attempts to edit or create
files larger than this limit cause _v_i to terminate with an appropriate
error message. There is also a limit of 8192 bytes per line (languages
with multibyte characters may therefore have fewer than 8192 characters
per line; otherwise this is also the number of characters per line.
Files with longer lines are not edittable (or even viewable) with this
editor. Use of either _f_o_l_d(1) or _f_m_t(1) on the file (while changing the
contents) can be used to avoid this limit.
Several changes have been made and bugs fixed for XXXXPPPPGGGG4444 compliance. See
the discussion about _p_a_r_a_g_r_a_p_h_s above, for one case. Additionally, the eeee
(move to end of word) command had bugs skipping over single letter words,
and skipped one to few words, when the current position was the last
letter in a word. Formerly, the ordering of the ----cccc and ----tttt options was
not defined, and the command was executed before moving to the tag. The
order is now reversed. If a file is readonly, the !!!! override must now be
used whenever you write the file, not just the first time.
Tampering with entries in /_u_s_r/_l_i_b/_t_e_r_m_i_n_f_o/?/* (for example, changing or
removing an entry) can affect programs such as that expect the entry to
be present and correct. In particular, removing the "dumb" terminal may
cause unexpected problems.
The regular expression has been changed to XPG4 compliance, please see
regcomp(5).
SSSSEEEEEEEE AAAALLLLSSSSOOOO
ctags(1), ed(1), edit(1), ex(1), regcomp(5), vi(1).
BBBBUUUUGGGGSSSS
In insert mode, software tabs using ^^^^TTTT work only immediately after the
aaaauuuuttttooooiiiinnnnddddeeeennnntttt.
PPPPaaaaggggeeee 7777
vvvviiii((((1111)))) vvvviiii((((1111))))
Left and right shifts on intelligent terminals do not make use of insert
and delete character operations in the terminal.
PPPPaaaaggggeeee 8888